<cfif FileExists(GetDirectoryFromPath(GetCurrentTemplatePath())&"..\Application.cfm")>
	<cfinclude template="../Application.cfm" />
</cfif>
<cfsilent>
<cfapplication name="appGenerator" sessionmanagement="yes" setclientcookies="yes">

<cfparam name="application.appHome" default="#GetDirectoryFromPath(CGI.SCRIPT_NAME)#" />

<cfparam name="session.myDSN" default="" />
<cfparam name="session.CFADMIN_PASSWORD" default="" />

<cfparam name="cookie.dtFrmt" default="mm/dd/yyyy" />
<cfparam name="cookie.iconhome" default="/Image/icons/" />
<cfparam name="cookie.debug" default="1" />
<cfparam name="cookie.onQuerySuccess" default="" />
<cfparam name="cookie.onQueryError" default="" />
<cfparam name="cookie.useCustomTagDate" default="" />

<cfparam name="request.dsn" default="#session.myDSN#" />

<cfscript>
	// application variables
	request.appEmail	= 'info@parkapps.com';
	request.appName 	= 'App Generator';
	request.appHome 	= application.appHome;
	request.dtFrmt 		= cookie.dtFrmt;
	request.iconhome 	= cookie.iconhome;
	request.lstRecsPerPage = '25,50,100,200,400,1000';
	
	// take url & form scopes and combine them
	if(not isDefined('attributes')) {
		attributes = StructNew();
	}
	StructAppend(attributes, url, true);
	StructAppend(attributes, form, true);
	
	if(isDefined('attributes.myDSN')) {
		session.myDSN = attributes.myDSN;
	}
	if(isDefined('session.myDSN')) {
		request.dsn = session.myDSN;
	}
	
	if(isDefined('attributes.logout')) {
		session.CFADMIN_PASSWORD = '';
	}
	
</cfscript>

<!--- settings --->
<cfsetting showdebugoutput="#cookie.debug#" />

<cfparam name="attributes.cachetime" default="#CreateTimeSpan(1,0,0,0)#" />
<cfparam name="attributes.debug" default="0" />
<cfparam name="attributes.recsPerPage" default="50" />
<cfparam name="attributes.q" default="" />

<!--- application variables for fck editor --->
<cflock scope="application" timeout="10">
	<cfscript>
		// these variables are for FCKeditor
		application.userFilesPath = "/";
		application.basePath = request.appHome;
		application.serverPath = GetDirectoryFromPath(GetCurrentTemplatePath());
		request.serverPath = GetDirectoryFromPath(GetCurrentTemplatePath());
	</cfscript>
</cflock>
<!--- <cftry>
<cfinclude template="inc/functions.cfm" />
<cfcatch></cfcatch>
</cftry> --->
</cfsilent>
<cfinclude template="inc/header.cfm" />